package com.example.demo.dto;

import com.example.demo.entity.RoutingField;

public class RoutingFieldDTO {
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getEnglishName() {
        return englishName;
    }

    public void setEnglishName(String englishName) {
        this.englishName = englishName;
    }

    public String getChineseName() {
        return chineseName;
    }

    public void setChineseName(String chineseName) {
        this.chineseName = chineseName;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    private Integer id;
    private String englishName;
    private String chineseName;
    private String description;

    // 从实体类转换为DTO
    public static RoutingFieldDTO fromEntity(RoutingField entity) {
        RoutingFieldDTO dto = new RoutingFieldDTO();
        dto.setId(entity.getId());
        dto.setEnglishName(entity.getEnglishName());
        dto.setChineseName(entity.getChineseName());
        dto.setDescription(entity.getDescription());
        return dto;
    }
}